package com.woniuxy.feign;

import com.woniuxy.entity.ShopOrder;
import com.woniuxy.entity.VO.RenkingVO;
import com.woniuxy.enums.order.ShopOrderStatus;
import com.woniuxy.util.ResponseData;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigDecimal;

/**
 * @Author hq
 * @Date 2025/7/14$ 23:03$
 * @Description TODO
 * @Params $
 * @Return $
 **/
@FeignClient(name = "campus-order")
public interface OrderApi {
    @GetMapping("/shoporder/getOrderInfo/{orderId}")
    public ShopOrder getOrderInfo(@PathVariable("orderId") Integer orderId);
    @PostMapping("/shoporder/status/{orderId}/{status}")
    public ResponseData updateOrderStatus(
            @PathVariable("orderId") Integer orderId,
            @PathVariable("status") Integer status
    );
    @PostMapping("/renking/updateRanking/{userId}/{earnings}")
    public ResponseData updateRanking(@PathVariable("userId") Integer userId,
                                      @PathVariable("earnings") BigDecimal earnings);
    @GetMapping("/run-mini/updatePay")
    public ResponseData updatePay(@RequestParam("runNumber") String runNumber);
    @PostMapping("/lockCoupon/{id}")
    public Integer lockCoupon(Integer couponId);
}
